#pragma once
#include "d3dUtil.h"

class Ball
{
	private:
		//param: ID3DXMesh ballMesh is the variable that represents the mesh of the ball
		ID3DXMesh* ballMesh;
		
		//param: float radius, uint slices, uint stacks, variables used to create the sphere
		float radius;
		unsigned int slices;
		unsigned int stack;
		float Ay, lastVy;
		
		//position of ball
		D3DXVECTOR3 pos;

		float accumTime;


	public:
		Ball();
		Ball(float, unsigned int, unsigned int, float, float, float);
		~Ball();

		void createBall(float, unsigned int, unsigned int);

		void draw();

		void update(float dy);

		D3DXVECTOR3& ballPos() { return pos; }
		float getAccumTime() { return accumTime; }
};